package com.wuhen.register;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;

public class ResultActivity extends AppCompatActivity {


    @SuppressLint("SetTextI18n")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_result);
        TextView userNum = findViewById(R.id.textView1);
        TextView stNum = findViewById(R.id.textView2);
        TextView userName = findViewById(R.id.textView3);
        TextView userMail = findViewById(R.id.textView4);
        TextView psw = findViewById(R.id.textView5);
        TextView userPhone = findViewById(R.id.textView6);
        TextView xy=findViewById(R.id.textView7);
        //获取启动该Result的Intent
        Intent intent = getIntent();
        //获取该intent所携带的数据
        Bundle data = intent.getExtras();
        //从Bundle包中取出数据
        User user = (User) data.getSerializable("user");
        userNum.setText("登入名:"+ user.getUserNum());
        stNum.setText("学号:"+user.getStNum());
        userName.setText("姓名:" + user.getUserName());
        userMail.setText("邮箱："+user.getUserMail());
        psw.setText("密码："+user.getUserPsw());
        xy.setText("所属院系："+user.getXy());
        userPhone.setText("电话:"+user.getUserPhone());



    }
}
